package com.atguigu.spzx.manager.service.impl;

import com.atguigu.spzx.manager.mapper.SysOperLogMapper;
import com.atguigu.spzx.manager.service.SysOperLogService;
import com.atguigu.spzx.model.dto.system.SysOperLogDto;
import com.atguigu.spzx.model.entity.system.SysOperLog;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class SysOperLogServiceImpl implements SysOperLogService {
    @Resource
    private SysOperLogMapper sysOperLogMapper;
    @Override
    @Transactional(readOnly = true)
    public PageInfo<SysOperLog> getPageList(Integer current, Integer size, SysOperLogDto sysOperLogDto) {
        PageHelper.startPage(current,size);
        List<SysOperLog> sysOperLogList=sysOperLogMapper.findAll(sysOperLogDto);
        return new PageInfo<>(sysOperLogList);
    }
}
